package com.bocloud.cmp.dao;

import java.util.List;

import com.bocloud.cmp.entity.resource.NetworkHost;

/**
 * 网络-主机DAO接口
 * 
 * @author weiwei
 * @version 1.0
 * @since 2017.4.21
 *
 */
public interface NetworkHostDao {

	/**
	 * 根据主机ID查询
	 * 
	 * @param vhostId
	 * @param category
	 * @return
	 * @throws Exception
	 */
	public List<NetworkHost> list(Long vhostId, String category) throws Exception;

	/**
	 * 保存
	 * 
	 * @param networkHost
	 * @return
	 * @throws Exception
	 */
	public NetworkHost save(NetworkHost networkHost) throws Exception;

	/**
	 * 更新
	 * 
	 * @param networkHost
	 * @return
	 * @throws Exception
	 */
	public boolean update(NetworkHost networkHost) throws Exception;

	/**
	 * 删除
	 * 
	 * @param networkHost
	 * @return
	 * @throws Exception
	 */
	public boolean delete(NetworkHost networkHost) throws Exception;

	/**
	 * 删除
	 * 
	 * @param vendorId
	 * @return
	 * @throws Exception
	 */
	public boolean removeByVendor(Long vendorId) throws Exception;

	/**
	 * 根据虚拟宿主机ID删除
	 * 
	 * @param vhostId
	 * @param category
	 * @return
	 * @throws Exception
	 */
	public boolean deleteByHost(Long vhostId, String category) throws Exception;

	/**
	 * 根据网络ID删除
	 * 
	 * @param networkId
	 * @return
	 * @throws Exception
	 */
	public boolean deleteByNetwork(Long networkId) throws Exception;
}
